<template>
  <Maptalks :mapOnLoadCB="mapOnLoadCB"></Maptalks>
  <button class="full-screen-bar" @click="fullScreen">全屏</button>
</template>

<script>
import Maptalks from "@/components/common/Maptalks.component.vue"
import MapLayerConst from "@/const/MapLayerConst"

export default {
  name: "AddFullscreen.component",
  components: {Maptalks},
  setup() {

    const fullScreen = () => {
      document.getElementById("map").requestFullscreen().then(res => {
        console.log(res);
      }).catch(error => {
        console.log(error);
      });
    };

    let mapOnLoadCB = (map) => {

    };

    return {
      mapOnLoadCB,
      fullScreen
    }
  }
}
</script>

<style scoped lang="less">
.full-screen-bar {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 999;
  cursor: pointer;
}
</style>
